<template>
	<el-switch :id="'zhSwitch' + columnId" :name="'zhSwitch' + columnId" v-bind="allAttrs" v-model="value" :size="state.mySize"></el-switch>
</template>
<script lang="ts" setup name="zh-switch">
import itemController from '@/components/lib/base/controller-item';
import { itemProps } from '../lib/mapController';
const props = defineProps({
	...itemProps,
	modelValue: {
		type: [Number, String, Boolean],
		default: false,
	},
});
const attrs = useAttrs();
const allAttrs = computed(() => {
	return Object.assign(props.extend, attrs);
});
const emit = defineEmits(['update:modelValue']);
const { value, globalSize } = itemController(props, allAttrs.value, emit);
const state = reactive({
	mySize: allAttrs.value.size,
});
globalSize(state);
</script>
